
import request from '@/utils/request'
// -------- 内容模板 --------

let BASE_ADDRESS = '/base/docModule'

//  分页查询
export const getContentTempListApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/list`,
        params
    })
}
//  分页查询  --使用这个  2021-10-25
export const getDocModuleListApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: 'get',
        params
    })
}

// 修改模块
export const editModuleApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "put",
        data
    })
}


// 删除模块
/**
 * @param {string} no 编号
 * @param {string}  type 类型
 * 
 */
export const DeleteModuleApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/remove`,
        method: "delete",
        data
    })
}

// 删除单个模块
export const DeleteModuleSingleApi = (id) => {
    return request({
        url: `${BASE_ADDRESS}/remove/${id}`,
        method: "delete",

    })
}

// 添加模块
export const addModuleSingleApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "post",
        data
    })
}

// 按类型查找
export const getDocModuleByTypeApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/getByType`,
        method: "get",
        params
    })
}

// 按类型查找 --使用这个 2021-10-25
export const getTypteCatgoryApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/getByType`,
        method: "get",
        params
    })
}

//// 删除
export const deletmoduleApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/remove`,
        method: "delete",
        data,
    })
}

// 修改状态
export const editStatusApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/editStatus`,
        method: "put",
        data,
    })
}





